home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / comm / comm1 / wordo.lha / wordo / Wordo next >
Text File  |  1996-11-04  |  19KB  |  500 lines

  1. /**************************************************************************\
  2.                  $VER: Wordo, v2.31 (4-Nov-96) by Dotoran!
  3. \**************************************************************************/
  4. options results ; signal on SYNTAX ; signal on ERROR ; signal on IOERR
  5. tr=transmit ; se=sendstring ; gu=getuser 
  6. mstring='Yes Yes Think Yes 0' ; changewhere 'Wordo Game'
  7. gu 1 ; handle=result ; gu 15 ; ac=result
  8. loadscratch 1 ; savescratch (-1) ; getscratch 15 ; ac1=result
  9. gu 1311992 ; path=result ; scorepath = path'Wordo.scores' 
  10. docspath = path'Wordo.docs' ; titlepath = path'Wordo.title'
  11.  
  12. if ~exists(scorepath) then call MAKESCORES
  13.  
  14. MAINT:
  15.   call READMAINT ; getuser 15 ; ac=result
  16.   if ac~=ac1 then signal TITLE
  17.   se 'c7n2Enter c5WORDO c7Maintenance? c3(c6yc3/c6Nc3)c7: c5'
  18.   getchar ; an=result ; call CHECK
  19.   if an~='Y' then do ; tr 'No.' ; signal TITLE ; end
  20.   tr 'Yes.' ; fl=0
  21.  call MAINT2
  22.  
  23. TITLE:
  24.   se '*4'titlepath'}'
  25.   se 'c7Need instructions? c3(c6yc3/c6Nc3)c7: c5' ; getchar
  26.   an=result ; call CHECK ; if an~="Y" then do ; tr 'No' ; signal START ; end
  27.   tr 'Yes' ; tr '@4#0'docspath'}' ; exit
  28.  
  29. START:
  30.   call WORDS ; call POINTS ; call SHOWSCORES
  31.  
  32.   turns=0 ; myturns=0 ; totpips=0 ; mytotpips=0 ; first=0
  33.   elim=1 ; mypick=1 ; mypick1=0 ; ghint=''
  34.  
  35.   comstr='f0nfn5>f>f>f>b'
  36.  
  37.   se 'n1c6Do you wish to go first? c7(c3Yc7/c3nc7)c6:c2 '
  38.   call GCHAR ; fm=1 ; if an="N" then fm=0
  39.  
  40.   if m4~='Yes' then do ; hint=0 ; signal START2 ; end
  41.   se 'n1c6Do you want the c2HINT c6option? c7(c3Yc7/c3nc7)c6: c2'
  42.   call GCHAR ; hint=0 ; if an~="N" then hint=1
  43.  
  44. START2:
  45.   tr 'f1'
  46.   if fm=1 then call YOUCHOOSE
  47.   if fm=0 then call ICHOOSE
  48.  signal BOARD
  49.  
  50. YOUCHOOSE:
  51.   se 'f0n6c3Pick start letter: c6(c7Ac6-c7zc6)c3:  h1c5'
  52.   lo=1 ; hi=5 ; getchar ; an=result ; call CHECK ; tr an
  53.   av=pos(an,'A B C D E F G H I J K L M N O P Q R S T U V W X Y Z ')
  54.   if av=0 then signal YOUCHOOSE
  55.   call YOUCHOOSE2 ; signal DISPLAY
  56.  return
  57.  
  58. YOUCHOOSE2:
  59.   a1=a.av ; av=av+1 ; a2=a.av ; av=av-1
  60.   do i=1  to 10 ; w.i=subword(a1,i,1)    ; end
  61.   do i=11 to 20 ; w.i=subword(a2,i-10,1) ; end
  62.   f1=0 ; f2=0
  63.  return
  64.  
  65. DISPLAY:
  66.   w=w.lo ; w1=upper(left(w,1)) ; iv=hi/5
  67.   tr 'f0n8z7c1Words:z0 c6'w1'c7-c6'iv'n1'
  68.   do i=0 to 4 ; in=lo+i ; tr 'c7'i+1'. c2'w.in ; end
  69.   tr 'n1c6Fc7. c6Fc7orwardn1c6Bc7. c6Bc7ackward'
  70.   se 'c6Lc7. c7New c6Lc7ettern2c3Choice:  h1c5'
  71.   getchar ; an=result ; call CHECK ; tr an'n1' ; a=pos(an,'12345')
  72.   if a>0  then call CHOSE
  73.   if an=f then call FORWARD
  74.   if an=b then call BACKUP
  75.   if an=l then call YOUCHOOSE
  76.  signal DISPLAY
  77.  
  78. CHOSE:
  79.   in=(lo+a)-1 ; yourword=w.in
  80.   if fm=1 then signal ICHOOSE
  81.  signal BOARD
  82.  
  83. BACKUP:
  84.   lo=lo-5 ; hi=hi-5
  85.   if lo<1 then do ; f1=1 ; call MOVE ; call YOUCHOOSE2 ; end
  86.  return
  87.  
  88. FORWARD:
  89.   lo=lo+5 ; hi=hi+5
  90.   if hi>20 then do ; f2=1 ; call MOVE ; call YOUCHOOSE2 ; end
  91.  return
  92.  
  93. MOVE:
  94.   if f1=1  then do ; av=av-2 ; lo=16 ; hi=20 ; end
  95.   if f2=1  then do ; av=av+2 ; lo=1  ; hi=5  ; end
  96.   if av<1  then do ; av=51   ; lo=16 ; hi=20 ; end
  97.   if av>51 then do ; av=1    ; lo=1  ; hi=5  ; end
  98.  return
  99.  
  100. ICHOOSE:
  101.   t1=random(1,52,time('s')) ; a1=a.t1
  102.   t1=random(1,10,time('s'))
  103.   myword=subword(a1,t1,1)
  104.   if fm=0 then signal YOUCHOOSE
  105.  
  106. BOARD:
  107.   se 'f1@4     z7c1HUMANz0 z7c4PIPSz0      z7c1HUMANz0 z7c4PIPSz0  c3(c5'yourword
  108.   tr 'c3)    z7c4AMIGAz0 z7c1PIPSz0      z7c4AMIGAz0 z7c1PIPSz0n1'
  109.   tr 'c7100  c6_____  c2_    c750  c6_____  c2_          c7100  c6_____  c2_    c750  c6_____  c2_'
  110.   tr 'c7 95  c6_____  c2_    c745  c6_____  c2_          c7 95  c6_____  c2_    c745  c6_____  c2_'
  111.   tr 'c7 90  c6_____  c2_    c740  c6_____  c2_          c7 90  c6_____  c2_    c740  c6_____  c2_'
  112.   tr 'c7 85  c6_____  c2_    c740  c6_____  c2_          c7 85  c6_____  c2_    c740  c6_____  c2_'
  113.   tr 'c7 80  c6_____  c2_    c740  c6_____  c2_          c7 80  c6_____  c2_    c740  c6_____  c2_'
  114.   tr 'c7 75  c6_____  c2_    c740  c6_____  c2_          c7 75  c6_____  c2_    c740  c6_____  c2_'
  115.   tr 'c7 70  c6_____  c2_    c735  c6_____  c2_          c7 70  c6_____  c2_    c735  c6_____  c2_'
  116.   tr 'c7 65  c6_____  c2_    c735  c6_____  c2_          c7 65  c6_____  c2_    c735  c6_____  c2_'
  117.   tr 'c7 60  c6_____  c2_    c735  c6_____  c2_          c7 60  c6_____  c2_    c735  c6_____  c2_'
  118.   tr 'c7 55  c6_____  c2_    c735  c6_____  c2_          c7 55  c6_____  c2_    c735  c6_____  c2_n1'
  119.   tr 'c21c7: c6A B C D E F G H I J K L M N O P Q R S T U V W X Y Z'
  120.   tr 'c22c7: c6A B C D E F G H I J K L M N O P Q R S T U V W X Y Z'
  121.   tr 'c23c7: c6A B C D E F G H I J K L M N O P Q R S T U V W X Y Z'
  122.   tr 'c24c7: c6A B C D E F G H I J K L M N O P Q R S T U V W X Y Z'
  123.   tr 'c25c7: c6A B C D E F G H I J K L M N O P Q R S T U V W X Y Zn1'
  124.  
  125.   tr 'z7 c0Menu:  [c1Ec0]c4nter a guess   c0[c1Sc0]c4trike a letter    z0'
  126.   tr '       z7 c0[c4Cc0]c1hoose alphabet c0[c4Rc0]c1eplace a letter   z0'
  127.   tr '       z7 c0[c1Qc0]c4uit the game   c0[c1Hc0]c4ighlight a letter z0'
  128.   if hint=1 then tr 'f0ndn7z5 z0c3Hint:z5 z0n1z5 z0     z5 z0'
  129.   tr 'f0ndz7c11z0'
  130.  
  131.   if fm=1 then signal PLAY
  132.   if fm=0 then signal MYPLAY
  133.  
  134. PLAY:
  135.   se 'f0n9n9n1>f>f>f>bz7c1 Menu:z0  c6' ; getchar
  136.   co=result ; call CHECK ; z=pos(co,"ECQSRH") ; if z=0 then signal PLAY
  137.   if co=Q then do ; tr 'Quit Game' ; signal FINISH ; end
  138.   if co=C then do ; tr 'Choose' ; call CHOOSE   ; end
  139.   if co=E then do ; tr 'Enter'  ; call YOUCHOOSE2 ; signal ENTER ; end
  140.   if co=S then do ; tr 'Strike'     ; signal STRIKE     ; end
  141.   if co=R then do ; tr 'Replace'    ; signal REPLACE    ; end
  142.   if co=H then do ; tr 'Highlight'  ; signal HIGHLIGHT  ; end
  143.  signal PLAY
  144.  
  145. ENTER:
  146.   tr 'f0n9n3' ; do i=0 to 4 ; in=lo+i
  147.   tr '>9>9>9>9>9>bc7'i+1'. c2'w.in ; end
  148.   tr 'f0n9n4>f>f>f>f>5c7[c1Fc7]c3orward'
  149.   tr 'n1>f>f>f>f>5c7[c1Bc7]c3ackup'
  150.   tr 'n1>f>f>f>f>5c7[c1Lc7]c3etter'
  151.   se 'n1>f>f>f>bz7c4 Choose:z0        h7c6' ; getchar
  152.   an=result ; call CHECK ; a=pos(an,"12345") ; aa=pos(an,"12345FBL")
  153.   if a>0  then do ; tr '       '    ; signal CHOSE2  ; end
  154.   if an=f then do ; tr 'Forward'    ; call FORWARD   ; end
  155.   if an=b then do ; tr 'Backup'     ; call BACKUP    ; end
  156.   if an=l then do ; se 'Letter!1<e' ; signal ENTER2 ; end
  157.   if aa=0 then signal PLAY
  158.  signal ENTER
  159.  
  160. ENTER2:
  161.   se 'c6Which Onec3: c5' ; call GETLET
  162.   av=letter ; call YOUCHOOSE2 ; call CLINE
  163.  signal ENTER
  164.  
  165. CHOSE2:
  166.   in=(lo+a)-1 ; guess=w.in ; turns=turns+1
  167.   co='c6' ; if turns//2=0 then co='c2'
  168.   if turns>10 then signal CHOSE3
  169.   pr='f0n1' ; po=turns ; call POSITION
  170.   pr=pr||'n'mt'>5'co ; se pr||guess
  171.  signal GETPIPS
  172.  
  173. CHOSE3:
  174.   pr='f0n1' ; po=turns ; call POSITION
  175.   pr=pr||'n'mt'>f>6'co ; se pr||guess
  176.  signal GETPIPS
  177.  
  178. GETPIPS:
  179.   pips=0 ; do i=1 to 5 ; co1=substr(myword,i,1)
  180.   co2=substr(guess,i,1) ; if co1=co2 then pips=pips+1 ; end
  181.   co='c2' ; if turns//2=0 then co='c6'
  182.   if guess=myword then do ; totpips=totpips+pt.turns
  183.   tr '  z1c7'totpips'z0' ; signal WIN ; end
  184.   if pips=5 then pips=10
  185.   tr '  'co||pips ; totpips=totpips+pips
  186.   if totpips%5>0 then ghint=right(myword,(totpips%5))
  187.   if hint=1 then tr 'f0ndn8>1c2'right(ghint,5,' ')
  188.   if turns=20 & myturns=20 then signal FINISH2
  189.  signal MYPLAY
  190.  
  191. WIN:
  192.   tr 'f0nfn4>f>f>f>f>5z1c7You won!z0'
  193.   if totpips>49 then do ; tp=totpips ; call CHECKSCORES ; end
  194.  signal FINISH2
  195.  
  196. CHOOSE:
  197.   se comstr'c6Which: c3(c21c3-c25c3)c6: c5' ; getchar
  198.   el=elim ; elim=result ; a=pos(elim,"12345")
  199.   if a=0 then elim=1
  200.  
  201. CHOOSE2:
  202.   pr='f0nc' ; do i=1 to el   ; pr=pr||'n1' ; end
  203.   tr pr'c2'el
  204.   pr='f0nc' ; do i=1 to elim ; pr=pr||'n1' ; end
  205.   tr pr'z7c1'elim'z0' ; call CLINE
  206.  return
  207.  
  208. STRIKE:
  209.   se comstr'c6Which letterc3? c5' ; call GETLET
  210.   tr pr'>2c0 ' ; call CLINE ; call SETELIM
  211.  signal PLAY
  212.  
  213. REPLACE:
  214.   se comstr'c6Which letterc3? c5' ; call GETLET
  215.   tr pr'>2c6'upper(le) ; call CLINE ; call SETELIM
  216.  signal PLAY
  217.  
  218. HIGHLIGHT:
  219.   se comstr'c6Which letterc3? c5' ; call GETLET
  220.   tr pr'>2z7c5'upper(le)'z0' ; call CLINE ; call SETELIM
  221.  signal PLAY
  222.  
  223. MYPLAY:
  224.   myturns=myturns+1 ; mypips=0 ; call time('r')
  225.   tr 'f0nfn4>f>f>f>f>5c7o1My turn.o0'
  226.  
  227. MYPLAY2:
  228.   se comstr'c3Thinking: c5'time('e') ; et=time('e')
  229.   if et>think then do ; call GETWORD ; signal MP1 ; end
  230.   a1=random(1,52,time('s'))  ; a2=random(1,10,time('s'))
  231.   if myturns>10 then call GETWORD
  232. MP1:
  233.   myguess=subword(a.a1,a2,1) ; uw.myturns=myguess
  234.   if myturns>1 then signal USEDWORDS
  235. MP2:
  236.   call SHOWWORD ; call GETMYPIPS
  237.   if mypips=0 then call BADLETTERS
  238.   co='c6' ; if myturns//2=0 then co='c2'
  239.   if myguess=yourword then do ; mytotpips=mytotpips+pt.myturns
  240.       tr 'z4c7'mytotpips'z0' ; signal IWIN ; end
  241.   if mypips=5 then mypips=10
  242.   mytotpips=mytotpips+mypips
  243.   tr co||mypips ; call CLINE
  244.   if myturns=20 & turns=20 then signal FINISH2
  245.  signal PLAY
  246.  
  247. GETWORD:
  248.   mypick1=mypick1+1 ; mypick2=mypick
  249.   if mypick1>52 then do ; mypick1=1 ; mypick=mypick+1
  250.       signal GETWORD ; end
  251.   a1=mypick1 ; a2=mypick2 ; se '  h2c1-E '
  252.  return
  253.  
  254. USEDWORDS:
  255.   do i=1 to myturns-1
  256.   if uw.i=myguess then signal MYPLAY2
  257.   end ; do i=1 to 5 ; a1=substr(myguess,i,1)
  258.   do j=1 to length(wo.i) ; a2=substr(wo.i,j,1)
  259.   if a1=a2 then signal MYPLAY2
  260.   end j ; end i
  261.  signal MP2
  262.  
  263. SHOWWORD:
  264.   pr='f0n1' ; po=myturns ; call POSITION
  265.   co='c2' ; if myturns//2=0 then co='c6'
  266.   if myturns<11 then pr=pr||'n'mt'>f>f>e'co
  267.   if myturns>10 then pr=pr||'n'mt'>f>f>f>f'co
  268.   se pr||myguess'  '
  269.  return
  270.  
  271. GETMYPIPS:
  272.   do i=1 to 5
  273.   a1=substr(yourword,i,1)
  274.   a2=substr(myguess ,i,1)
  275.   if a1=a2 then mypips=mypips+1
  276.   end
  277.  return
  278.  
  279. BADLETTERS:
  280.   do i=1 to 5
  281.   wo.i=wo.i||substr(myguess,i,1)
  282.   end
  283.  return
  284.  
  285. IWIN:
  286.   call CLINE ; tr 'f0nfn4>f>f>f>f>5z4c7I won!z0'
  287.   if mytotpips>49 & m1='Yes' then do ; tp=mytotpips
  288.       call CHECKSCORES ; end
  289.  signal FINISH2
  290.  
  291. WORDS:
  292.   a.1 ='aback abate abbey abhor abide abode abort above acerb acute'
  293.   a.2 ='adapt addle altar amaze amour angel angle apart argue asset'
  294.   a.3 ='bacon badge baker balmy beast beech begin below berry bilge'
  295.   a.4 ='binge biome biped bogey bongo boost boxer budge bumpy burst'
  296.   a.5 ='cable cadet calve caste cedar chain charm chime chock churn'
  297.   a.6 ='clamp clock coast cobra colon coral count court curse cycle'
  298.   a.7 ='daffy daily dance dandy daunt death debug decay demon diary'
  299.   a.8 ='digit dingy dippy ditch diver divot donor douse dowry draft'
  300.   a.9 ='earth ebony eerie eject elbow elder elegy elope elude ember'
  301.   a.10='emery empty endow enemy enjoy enter epoch equip erase every'
  302.   a.11='fable faint fairy false feast felon fence ferry field fiber'
  303.   a.12='fight fight folly foray force forge fudge fungi fussy fuzzy'
  304.   a.13='gamma gaudy gauge gavel genre genus ghost ghoul girth giver'
  305.   a.14='gland glaze gleam glory glove goose gouge grace grand guilt'
  306.   a.15='habit handy happy harsh heart heave heavy hefty hinge hitch'
  307.   a.16='hoard hoist holly honey honor human humid humor hutch hydro'
  308.   a.17='ideal idiot idler image impel imply index indue inert ingot'
  309.   a.18='inker inkle inlaw inlay inlet inner input irony itchy ivory'
  310.   a.19='jaded jaunt jelly jewel jiffy joint joist joker jolly joule'
  311.   a.20='joust judge juice juicy julep jumpy junky jurat jurel juror'
  312.   a.21='kaput karat karma kayak ketch khaki kicky kinky kithe kitty'
  313.   a.22='klutz knack knave knead knife knock known koala kvass kylix'
  314.   a.23='label labor ladle lapse leafy leaky leash least libel libra'
  315.   a.24='light limbo lobby locus lodge logic lucky lumpy lurch lymph'
  316.   a.25='macaw macro madam madly mealy meant medal melon micro midst'
  317.   a.26='might milky model money mooch moody mucky mulch music musky'
  318.   a.27='nakad nasal nasty naval needy neigh nerve never niche niece'
  319.   a.28='night ninth noble noisy north nosey nudge nurse nutty nymph'
  320.   a.29='oasis occur ocean offer often okapi olive omega onset optic'
  321.   a.30='orbit order organ osier other ounce ovary ovine oxide ozone'
  322.   a.31='paced padre pagen paint peace peach pearl pecan piano piece'
  323.   a.32='pilot pitch point poise poker polar puffy pulse punch pupil'
  324.   a.33='quack quaff quail quake quaky qualm quark quart queen queer'
  325.   a.34='quell query quest queue quick quiet quill quilt quirk quote'
  326.   a.35='rabbi rabid radio radon reach react ready rebus rider ridge'
  327.   a.36='right rigid roach roast rocky rogue ruler rummy rumor rural'
  328.   a.37='saber sable saint salon sedan sedge seedy seize siege sieve'
  329.   a.38='sight silly soapy sober solar solid suave suede sugar suite'
  330.   a.39='table taboo tacky taken teach teddy teeth tempo tidal tiger'
  331.   a.40='tight tilde toast today token tonic tuber tulip tuner tutor'
  332.   a.41='ulcer ultra unarm uncle uncut under undue untie unzip upend'
  333.   a.42='upper upset urban uredo urine usage usher usual utter uvula'
  334.   a.43='vague valet valid value venom venue verge verse vicar video'
  335.   a.44='vigil vigor villa viola viper virus visit visor voice vomit'
  336.   a.45='wafer wager wagon waist weary weave wedge weigh widow wield'
  337.   a.46='wince windy woman women woody world wound wrack wrath wreck'
  338.   a.47='xebec xenia xenon xeric xylan xylem zebra zilch zippy zonal'
  339.   a.48='xebec xenia xenon xeric xylan xylem zebra zilch zippy zonal'
  340.   a.49='yamen yearn yeast yield yodel yokel young yours youth yummy'
  341.   a.50='yamen yearn yeast yield yodel yokel young yours youth yummy'
  342.   a.51='zaire zebra zilch zippy xenia zonal xenon xeric xylan xylem'
  343.   a.52='zaire zebra zilch zippy xenia zonal xenon xeric xylan xylem'
  344.  return
  345.  
  346. POINTS:
  347.   pt=1 ; do i=100 to 45 by -5 ; pt.pt=i ; pt=pt+1 ; end
  348.   do i=1 to 4  ; pt.pt=40 ; pt=pt+1 ; end
  349.   do i=1 to 4  ; pt.pt=35 ; pt=pt+1 ; end
  350.   do i=1 to 20 ; uw.i=""  ; end
  351.   do i=1 to 5  ; wo.i=""  ; end
  352.  return
  353.  
  354. GETLET:
  355.   getchar ; le=result ; call CHECK
  356.   letter=pos(le,"ABCDEFGHIJKLMNOPQRSTUVWXYZ")
  357.   if letter=0 then signal GETLET ; else se le
  358.   letter=letter*2-1 ; pr='f0ncn'elim
  359.   do i=1 to letter ; pr=pr||'>1' ; end
  360.  return
  361.  
  362. CLINE:
  363.   se 'f0nfn4>f>f>f>f>4             '
  364.   se comstr'                  '
  365.  return
  366.  
  367. SETELIM:
  368.   el=elim ; elim=elim+1 ; if elim>5 then elim=1
  369.   call CHOOSE2
  370.  return
  371.  
  372. POSITION:
  373.   if po<11 then mt=substr("123456789a",po,1)
  374.   if po>10 then do ; po=po-10
  375.   mt=substr("123456789a",po,1) ; end
  376.  return
  377.  
  378. GCHAR:
  379.   getchar ; an=result ; call CHECK
  380.   if an="N" then tr 'No.'
  381.             else tr 'Yes.'
  382.  return
  383.  
  384. SHOWSCORES:
  385.   tr 'f1n4>az7c1      W  O  R  D  O      z0'
  386.   tr '>az1c7  H I G H   S C O R E S  z0'
  387.   tr '>ac5========================='
  388.   call open(file,scorepath,'r') ; s0=readln(file)
  389.   do i=1 to 5 ; s0=readln(file)
  390.   parse var s0 1 n.i 21 s.i + 20
  391.   tr '>az4c3 'n.i'c6'left(s.i,4,' ')
  392.   tr '>az0c5-------------------------'
  393.   end ; call close(file)
  394.  return
  395.  
  396. MAKESCORES:
  397.   se 'n1c3Please hold...'
  398.   s1='No One Yet          50 '
  399.   call open(file,scorepath,'w')
  400.   call writeln(file,mstring)
  401.   do 5 ; call writeln(file,s1) ; end
  402.   call close(file)
  403.   tr 'c6Thanks!'
  404.  return
  405.  
  406. CHECKSCORES:
  407.   if tp<s.5 then return
  408.   se comstr'z3c4 Congratulations! z0'
  409.   tr '!1<9<9c7 A New High Score'
  410.   if m2='Yes' & tp~=mytotpips then do ; getuser 1 ; handle=result
  411.   tr 'f0nc' ; sp=copies(" ",78) ; do i=1 to 5 ; tr sp ; end i
  412.   tr 'f0ndc3Type an c6alias c3to use in the c5High Scores c3file, or'
  413.   tr 'simply press c7ENTER/RETURN c3to use your current handle.n1'
  414.   se 'c7=> c2' ; receive ; an=result ; call CHECK ; if an~='' then handle=an
  415.   end ; do i=1 to 5 until tp>=s.i ; end
  416.   do j=5 to i by -1 ; jj=j-1
  417.   n.j=n.jj ; s.j=s.jj ; end
  418.   n.i=left(handle,20,' ') ; s.i=tp
  419.   if tp~=totpips then n.i=left('The Amiga!',20,' ')
  420.   call open(file,scorepath,'w') ; call writeln(file,mstring)
  421.   do i=1 to 5 ; s1=n.i||s.i ; call writeln(file,s1) ; end
  422.   call close(file)
  423.  return
  424.  
  425. READMAINT:
  426.   if ~exists(scorepath) then do ; parse var mstring m1 m2 m3 m4 m0
  427.       return ; end
  428.   call open(file,scorepath,'r')
  429.   s0=readln(file) ; do i=1 to 5
  430.   s.i=readln(file) ; end ; call close(file)
  431.   parse var s0 m1 m2 m3 m4 m0
  432.   think=20 ; if m3='Guess' then think=40
  433.   if m3='Try' then think=30
  434.  return
  435.  
  436. MAINT2:
  437.   tr 'f1n2z7 c1WORDO Maint: z0n1'
  438.   tr '    c71c6. c5Reset WORDO & High Scores.'
  439.   tr '    c72c6. c2Can Amiga Get High Scores  c7: c3'm1
  440.   tr '    c73c6. c5Use Alias in High Scores   c7: c3'm2
  441.   tr '    c74c6. c2Play Level of the Amiga    c7: c3'm3
  442.   tr '    c75c6. c5Allow the Hint Option      c7: c3'm4
  443.   tr '    c76c6. c2Save & Quit WORDO Maint.n1'
  444.   se 'c1Option: c4' ; getchar ; an=result ; call CHECK
  445.   if an<1 | an>6 then signal MAINT2 ; else tr an
  446.   if an=6 & fl=0 then do ; tr 'n1c7Quitting...' ; return ; end
  447.   if an=6 & fl=1 then do ; call SAVEMAINT ; return ; end
  448.   if an=1 then do ; tr 'n1c7Resetting Wordo...' ; call MAKESCORES
  449.       tr 'n1Wordo Reset.w2' ; signal MAINT ; end
  450.   if an=2 then m1=subword('No Yes',pos(left(m1,1),'YN',1),1) ; fl=1
  451.   if an=3 then m2=subword('No Yes',pos(left(m2,1),'YN',1),1) ; fl=1
  452.   if an=5 then m4=subword('No Yes',pos(left(m4,1),'YN',1),1) ; fl=1
  453.   if an~=4 then signal MAINT2
  454.   tr 'n1c6The c5Amiga c6opponent will:n1' ; fl=1
  455.   tr 'c71c6. c5Guessn1c72c6. c2Tryn1c73c6. c5Thinkn2c6to win the game.n1'
  456.   se 'c7Which level? c3' ; getchar ; an=result ; call CHECK
  457.   if an<1 | an>3 then a=2
  458.   m3='Think' ; if an=1 then m3='Guess'
  459.   if an=2 then m3='Try'
  460.  signal MAINT2
  461.  
  462. SAVEMAINT:
  463.   se 'n1c7Saving c1parameters...'
  464.   s0=m1||' '||m2||' '||m3||' '||m4||' 0'
  465.   call open(file,scorepath,'w')
  466.   call writeln(file,s0) ; do i=1 to 5
  467.   call writeln(file,s.i) ; end
  468.   call close(file) ; tr 'hahac1Parameters c7saved.'
  469.  return
  470.  
  471. FINISH:
  472.   se comstr'c7Are you sure? ' ; call GCHAR
  473.   if an="N" then do ; call CLINE ; signal PLAY ; end
  474.  
  475. FINISH2:
  476.   tr 'f0nc' ; sp=copies(" ",78) ; do i=1 to 5 ; tr sp ; end
  477.   tr 'f0nd>fc7Your word was: z3c1'yourword'z0c7   Your total is: z3c1 'totpips' z0'
  478.   tr 'n1c7>f  My word was: z3c4'myword'z0c7     My total is: z3c4 'mytotpips' z0'
  479.   se 'n1>fc2Want to play another game? c6(c5Yc6/c5nc6)c2: c3'
  480.   call GCHAR ; if an="N" then signal QUIT
  481.   tr 'f1n9c7Please hold...n2' ; signal START
  482.  
  483. QUIT:
  484.   tr 'f1ndc5We will meet again, human...'
  485.   le='c7Played z1c3 W O R D O   2 . 0 z0q1'
  486.   signal LEAVE
  487.  
  488. LEAVE: ; logentry le ; bufferflush ; exit
  489.  
  490. CHECK:;if ARG() & ARG(1)~='###PANIC' then return ARG(1)
  491.   getcarrier;if result='TRUE' then if ARG() then return ARG(1);else return
  492.   logentry 'Lost Carrier!!';bufferflush;exit
  493. SYNTAX:;ERROR:;IOERR:;e1=' Error: 'rc' ('errortext(rc)')'
  494.   e2='  Line: 'left(sigl,4)'File:';gu 1311992;a=result;gu 1311960
  495.   b=result;c='"'a||b'"';e2=e2' 'c;tr e1;tr e2;logentry e1;logentry e2
  496.   e=translate(sourceline(sigl),"\{","");do while e~=''
  497.   e3='Source: 'left(e,37);tr e3;logentry e3;e=substr(e,38);end;bufferflush
  498. /**************************************************************************\
  499. \****************************************** Frontiers BBS (716)/823-9892 **/
  500.